package com.stylefeng.guns.modular.system.service;

import com.baomidou.mybatisplus.service.IService;
import com.stylefeng.guns.modular.small.dto.OrderParamDTO;
import com.stylefeng.guns.modular.small.util.ResponseResultDTO;
import com.stylefeng.guns.modular.system.dto.ConsumerOrderDTO;
import com.stylefeng.guns.modular.system.model.ConsumerOrder;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 订单记录表 服务类
 * </p>
 *
 * @author stylefeng
 * @since 2019-09-09
 */
public interface IConsumerOrderService extends IService<ConsumerOrder> {

    /**
     * 查询订单，本地数据库查询
     *
     * @param param
     * @return
     */
    ResponseResultDTO searchOrder(ConsumerOrderDTO param);

    /**
     * 创建订单
     *
     * @param request
     * @param orderParamDTO
     * @return
     */
    ResponseResultDTO createOrder(HttpServletRequest request, OrderParamDTO orderParamDTO);

    /**
     * 下单成功通知地址
     *
     * @param request
     * @param attach
     * @return
     */
    ResponseResultDTO orderqueryAndUpdateOrder(HttpServletRequest request, String attach);

    /**
     * 查询订单
     *
     * @param orderNo
     * @return
     */
    ResponseResultDTO queryOrder(String orderNo);

    /**
     * 发起退款申请
     *
     * @param orderNo
     * @return
     */
    ResponseResultDTO refund(String orderNo);

    /**
     * <p>查询退款</p>
     *
     * @param orderNo
     * @return
     * @des 查询退款
     */
    ResponseResultDTO refundQuery(String orderNo);
}
